import { API } from '../config/config';

import HTTP from '../utils/http';

const COURSE_COLLECTION = API.COURSE_COLLECTION;

class CourseCollectionService extends HTTP {
  
  async getCourseCollectionData() {
    return new Promise((resolve, reject) => {
      this.axiosGet({
        url: COURSE_COLLECTION.GET_COURSE_COLLECTION_DATA,
        success: (res) => {
          resolve(res);
        },
        error: (err) => {
          alert('网络请求错误');
          window.location.reload();
        }
      })
    })
  }
 
}

export default CourseCollectionService;